home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1998 / MacHack 1998.toast / Sessions / Completions / Completions Source / OS Queues / OSQueueBase.h < prev    next >
Encoding:
Text File  |  1998-06-17  |  518 b   |  35 lines  |  [TEXT/CWIE]

  1. // OSQueueBase.h
  2.  
  3. #ifndef OSQueueBase_h
  4. #define OSQueueBase_h
  5.  
  6. #ifndef Integers_h
  7. #include "Integers.h"
  8. #endif
  9. #ifndef __OSUTILS__
  10. #include <OSUtils.h>
  11. #endif
  12.  
  13. class OSQueueLinkBase;
  14.  
  15. class OSQueueBase
  16.   {
  17.     private:
  18.         volatile QHdr head;
  19.         
  20.         // not implemented:
  21.             OSQueueBase( const OSQueueBase& );
  22.             void operator=( const OSQueueBase& );
  23.         
  24.     public:
  25.         OSQueueBase();
  26.         ~OSQueueBase();
  27.         
  28.         bool IsEmpty() const        { return head.qHead == 0; }
  29.         
  30.         void Put( OSQueueLinkBase& );
  31.         OSQueueLinkBase *Get();
  32.   };
  33.  
  34. #endif
  35.